//
//  ACHViewController.m
//  MansApp
//
//  Created by lanou3g on 15/7/13.
//  Copyright (c) 2015年 ACH. All rights reserved.
//

#import "ACHViewController.h"

@interface ACHViewController ()

@end

@implementation ACHViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    CompositeViewController *mainController = [[CompositeViewController alloc]init];
    PrettyViewController *pretty = [[PrettyViewController alloc]init];
    AmusementViewController *amusement = [[AmusementViewController alloc]init];
    MyNoteViewController *myNote = [[MyNoteViewController alloc]init];
    
      UINavigationController *mainNavi = [[UINavigationController alloc]initWithRootViewController:mainController];
    
    UINavigationController *prettyNavi = [[UINavigationController alloc]initWithRootViewController:pretty];
    
    UINavigationController *amusementNavi= [[UINavigationController alloc]initWithRootViewController:amusement];
    
    UINavigationController *myNoteNavi = [[UINavigationController alloc]initWithRootViewController:myNote];
    
    
    mainController.tabBarItem.title = @"综合社区";
    pretty.tabBarItem.title = @"娱乐天地";
    amusement.tabBarItem.title = @"美图鉴赏";
    myNote.tabBarItem.title = @"拾忆空间";
    
    
    
    mainController.tabBarItem.image = [UIImage imageNamed:@"cm2_note_icn_listen@2x"];
    pretty.tabBarItem.image =[UIImage imageNamed:@"cm2_note_icn_logo@2x"];
    amusement.tabBarItem.image =[UIImage imageNamed:@"cm2_btm_icn_music_prs@2x"];
    myNote.tabBarItem.image = [UIImage imageNamed:@"cm2_btm_icn_account_prs@2x"];
    
    
    [self setViewControllers:@[mainNavi,prettyNavi,amusementNavi,myNoteNavi]];

    ///
    
    self.tabBar.tintColor = [UIColor colorWithRed:0.346 green:0.566 blue:0.806 alpha:1.000];
    
    //设置navigationBar的背景图片
    //UIImage *image = [UIImage imageNamed:@"bg_nav@2x.png"];
    
    //[[UINavigationBar appearance]setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];
    [UIApplication sharedApplication].statusBarStyle = UIBarStyleBlackOpaque;
    [[UINavigationBar appearance]setBarTintColor:[UIColor colorWithRed:0.870 green:0.534 blue:0.627 alpha:1.000]];
 
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
